//
//  QBVMeCell.m
//  QiuBai
//
//  Created by yaohongchao on 16/4/21.
//  Copyright © 2016年 yaohongchao. All rights reserved.
//

#import "QBVMeCell.h"

@implementation QBVMeLoginCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if(self){
        [self setui];
    }
    return self;
}

-(void)setui{
    UIImageView *imgV = [[UIImageView alloc]init];
    [self.contentView addSubview:imgV];
    self.imgV = imgV;
    WS(weakSelf);
    [imgV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(weakSelf.contentView).offset(kMargin);
        make.centerY.mas_equalTo(weakSelf.contentView.mas_centerY);
        make.width.height.mas_equalTo(50);
    }];
    UILabel *lblTitle = [[UILabel alloc]init];
    [self.contentView addSubview:lblTitle];
    self.lblTitle = lblTitle;
    [lblTitle mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(imgV.mas_right).offset(kMargin);
        make.bottom.equalTo(weakSelf.contentView.mas_centerY);
        make.right.equalTo(weakSelf.contentView).offset(-kMargin);
        make.height.mas_equalTo(25);
    }];
    
    UILabel *lblSubTitle = [[UILabel alloc]init];
    [self.contentView addSubview:lblSubTitle];
    self.lblSubTitle = lblSubTitle;
    [lblSubTitle mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(imgV.mas_right).offset(kMargin);
        make.top.equalTo(weakSelf.contentView.mas_centerY);
        make.right.equalTo(weakSelf.contentView).offset(-kMargin);
        make.height.mas_equalTo(25);
    }];
}

+(CGFloat)getCellHeight{
    return 88.0f;
}

@end




@implementation QBVMeSwitchCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if(self){
        [self setui];
    }
    return self;
}

-(void)setui{
    UISwitch *sw = [[UISwitch alloc]init];
    [self.contentView addSubview:sw];
    self.sw = sw;
    WS(weakSelf);
    [sw mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(weakSelf.contentView.mas_centerY);
        make.right.equalTo(weakSelf.contentView).offset(-kMargin);
    }];
}


@end





